#ifndef _HomeSceneContent_h_
#define _HomeSceneContent_h_

#include "Global.h"



#include "../../model/proxy/ItemProxy.h"
#include "item/Item.h"

class HomeSceneContent
	: public cocos2d::CCNode
	, public cocos2d::extension::CCBMemberVariableAssigner
	, public cocos2d::extension::CCBSelectorResolver
{
public:
	CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(HomeSceneContent, create);

	HomeSceneContent(void);
	~HomeSceneContent(void);

	virtual cocos2d::SEL_MenuHandler onResolveCCBCCMenuItemSelector(cocos2d::CCObject * pTarget, cocos2d::CCString * pSelectorName);
	virtual cocos2d::extension::SEL_CCControlHandler onResolveCCBCCControlSelector(cocos2d::CCObject * pTarget, cocos2d::CCString * pSelectorName);
	virtual bool onAssignCCBMemberVariable(cocos2d::CCObject * pTarget, cocos2d::CCString * pMemberVariableName, cocos2d::CCNode * pNode);

	bool init();
	void refresh();
	void refreshEquip();	
	void putOnEquip(EquipInfo* equipInfo);
	void onEnter();
	void onExit();
	
public:
	void onEquipClick(cocos2d::CCObject * pSender);
	void onDungeonClick(cocos2d::CCObject * pSender);
	void onShopClick(cocos2d::CCObject * pSender);
	void onItemClick(cocos2d::CCObject * pSender);
	void onHelmClick(cocos2d::CCObject * pSender);
	void onNecklaceClick(cocos2d::CCObject * pSender);
	void onWeaponClick(cocos2d::CCObject * pSender);
	void onClothClick(cocos2d::CCObject * pSender);
	void onRingClick(cocos2d::CCObject * pSender);
	void onShoesClick(cocos2d::CCObject * pSender);
	void onAttributeBtnClick(CCObject * pSender, CCControlEvent pCCControlEvent);
    void _onNotification(CCObject* object);
private:
	CCLabelTTF* mAttack;
	CCLabelTTF* mDefense;
	CCLabelTTF* mLife;
	std::map<EquipPart, Item*> mEquipList;
};

#endif